<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script language="javascript">
	function showOrderDetail(id,orderid)
	{
		$.post("/orderlist/ajaxbutton", {"op": "showamazonsell","id":id},
		  function(data){
			  if(data.length==0)
			  {
				alert("没有数据！");
				return;  
				}else{
					var tmp='';				
					for(var i=0;i<data.length;i++)
					{
						tmp+='<tr>'
						tmp+="<td>"+data[i].productid+"</td><td>"+data[i].productname+"</td><td>"+data[i].ordernum+"</td><td>"+data[i].sellprice+"</td><td>"+data[i].shipprice+"</td><td>"+data[i].amount+"</td>";
						tmp+="</tr>";
						
					}
					 $("#showmabangid").html(tmp);
					 $("#sshowmabangorder").html(orderid);
					 $('#showmabangorder').modal('show');
				}
			 
		   },"json");
	}
</script>
<title>亚马逊退款记录</title>
<body class="withvernav">
<div class="bodywrapper">
{{include file='/public/leftmenu.tpl'}}
<div class="centercontent">
<div class="pageheader notab">
  <h1 class="pagetitle">亚马逊退款记录</h1>
  <span class="pagedesc">1、退款金额+退款运费:包含亚马逊收取的平台费和交易费<br>
  			&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;2、 退款手续费:客人取消订单，亚马逊收取商家退款操作费
  	</span>
  <div class="menulist">
    <ul class="profile_summary">
      
        </ul>
  </div>
  
</div>
<!--pageheader-->
<div id="contentwrapper" class="contentwrapper">
<div id="basicform" class="subcontent">
   <!--搜索栏-->
          <div>
          
   	
         <div style="clear: both"></div>
         <div class="page">{{$pageList}} 计{{$total}}条记录，共{{$totalpage}}页</div>
   </div>
      
    <form class="stdform stdform2" method="get" id="search" action="/order/amazoncancel">
    <input type='hidden' name='if_csv' id='if_csv'>
    <input type='hidden' name='csvlist' id='csvlist'>
    <input type='hidden' name='orderby' id='orderby'>

      <div class="tableoptions"> 
        <select name="shopid" id="shopid"  class="selection select2_group" style="width:150px;" >
        <option value="" >店铺</option>
        {{foreach from=$d_shop item=li key=key}}
              <option value="{{$li.id}}" {{if $shopid==$li.id}} selected{{/if}}>{{$li.name}}</option>
        {{/foreach}}
        </select>
      
      
               
       <select name="ty" id="searchtype" class="selection" style="width:100px;" >
        <option value="1" {{if $ty==1}} selected{{/if}}>订单时间</option>
         <option value="2" {{if $ty==2}} selected{{/if}}>导入时间</option>
          <option value="3" {{if $ty==3}} selected{{/if}}>报告时间</option>
      </select>
    
       <input type="text"  name="starttime" value="{{$starttime}} " onClick="WdatePicker({dateFmt:'yyyy-MM-dd '})" class="width100 hasDatepicker" /> - <input type="text"  name="endtime" value="{{$endtime}} " onClick="WdatePicker({dateFmt:'yyyy-MM-dd '})" class="width100 hasDatepicker" />
       订单号: <input type="text" name="other" id="other" class="width200" value="{{$other}}" placeholder="订单编号" />
     
                           
&nbsp;
        <button class="btn btn-primary" id="searchbtn">Search</button>
     
      </div>
      
    
    </form>
    <!--搜索栏结束-->
    <div class="x_content" style="overflow-x:auto;">
<table cellpadding="0" cellspacing="0" border="0" class="stdtable">
<thead>
  <tr class="lbbt">
    <td width="5%"  bgcolor="#FEFFF1"><a onClick="allSelect('ppid[]')">全选</a></td>
    <td  bgcolor="#FEFFF1">订单编号</td>
    <td  bgcolor="#FEFFF1">国家</td>
    <td  bgcolor="#FEFFF1">退款金额(RMB)</td>
    <td  bgcolor="#FEFFF1">退款运费(RMB)</td>
    <td  bgcolor="#FEFFF1">退款手续费(RMB)</td>
    <td  bgcolor="#FEFFF1">报告时间</td>
    <td  bgcolor="#FEFFF1">订单时间</td>
    <td  bgcolor="#FEFFF1">平台/店铺/负责人</td>
    <td  bgcolor="#FEFFF1" >导入日期</td>

    
  </tr>
</thead>
<tbody >

{{foreach from=$orderlist item=li key=key}}
  <tr >
    <td bgcolor="#FFFFFF"><input name="ppid[]" type="checkbox" class="none" id="ppid[]" value="{{$li.orderId}}" /></td>
    <td valign="middle" bgcolor="#FFFFFF" style="position:relative;">
    {{if $li.isform==1}}
     <a href="http://192.168.1.100:89/eshop/order.do?method=edit&orderid={{$li.mabangorder}}" target="_blank">{{$li.tradeid}}</a>[马帮]
    {{else}}
    <a href="/orderlist/orderlist?ty=1&filtertype=tradeid&kw={{$li.tradeid}}" target="_blank"><font color="#6666FF">{{$li.tradeid}}</font></a>
   {{/if}}
     </td>
     <td valign="middle" bgcolor="#FFFFFF"><span style="margin-left:10px;"> {{$li.country_cn}} <!--<font color="#6666FF">{{$li.custcountry}}</font>--> </span></td>
    
    <td  bgcolor="#FFFFFF" style="position:relative;">
  {{$li.RMBmoney}}
   </td>
    <td valign="middle" bgcolor="#FFFFFF"><span style="position:relative;"> {{$li.shipping_fee}} </span></td>
    <td valign="middle" bgcolor="#FFFFFF">{{$li.RMBrefundmoney}}</td>
     <td valign="middle" bgcolor="#FFFFFF">{{$li.report_time}}</td>
        <td valign="middle" bgcolor="#FFFFFF">{{$li.ordertime}}</td>
 
    <td valign="middle" bgcolor="#FFFFFF">{{$li.shopname}} </td>
   <td  bgcolor="#FEFFF1" >{{$li.add_time}}</td>
  
   
  </tr>
   
{{/foreach}}
</tbody>

</table>
</div>
  <div class="page">{{$pageList}} 计{{$total}}条记录，共{{$totalpage}}页</div>
</div>
</div>

  
  <!-- 模态框（Modal）显示马帮订单号 -->
  <form  method="post">
  <div class="modal fade" id="showmabangorder" tabindex="-1" role="dialog" aria-labelledby="sshowmabangorder" aria-hidden="true">
    <div class="modal-dialog">
      <div class="modal-content">
        <div class="modal-header">
          <button type="button" class="close" data-dismiss="modal" 
               aria-hidden="true">× </button>
          <h4 class="modal-title" id="sshowmabangorder"> 输入订单编号  </h4>
        </div>
        <div class="modal-body">
         <table cellpadding="0" cellspacing="0" border="0" class="stdtable" style="table-layout: fixed;">
          <tr class="lbbt"><td width="20%" bgcolor="#FEFFF1">商品编号</td><td bgcolor="#FEFFF1" width="40%">商品名称</td><td bgcolor="#FEFFF1">数量</td><td bgcolor="#FEFFF1">价格</td><td bgcolor="#FEFFF1">运费</td><td bgcolor="#FEFFF1">总价</td></tr>
          <tbody id="showmabangid"></tbody>
          </table>
          <div class="modal-footer">
            <button type="button" class="btn btn-default" 
               data-dismiss="modal"> 关闭 </button>
          </div>
        </div>
        <!-- /.modal-content --> 
      </div>
      <!-- /.modal-dialog --> 
    </div>
  </div>
  <!-- /.modal -->
  </form>
</body>
</html>